#ifndef __UART_CMD__H_H__
#define __UART_CMD__H_H__


#include <stdint.h>


typedef enum{
    UART_CMD_GET_MCU_VERINFO,
    UART_CMD_GET_MCU_VERINFO_ACK,
    UART_CMD_READ_PORT_STA,
    UART_CMD_READ_PORT_STA_ACK,
    UART_CMD_FUN_OPERATE,
    UART_CMD_FUN_OPERATE_ACK,
    UART_CMD_PORT_UPLOAD,
    UART_CMD_SET_ID_INFO,
    UART_CMD_SET_ID_INFO_ACK,
    UART_CMD_CLEAR_ERR_INFO,
    UART_CMD_CLEAR_ERR_INFO_ACK,
    UART_CMD_READ_FUN_PORT,
    UART_CMD_READ_FUN_PORT_ACK,
    UART_CMD_READ_ID_INFO,
    UART_CMD_READ_ID_INFO_ACK,
};

#define PKT_UART_MSG_BUFF_SIZE (50)

typedef struct{
       uint8_t PKT_Head;
       uint8_t PKT_Len;
       uint8_t PKT_Cmd;
       uint8_t PKT_Buff[PKT_UART_MSG_BUFF_SIZE];
       uint8_t PKT_Sum;
}Uart_Msg_t;



typedef struct{
	uint8_t DevName[8];
	uint8_t FwVer[4];
	uint8_t HwVer[4];
}Board_VerInfo_t;


typedef struct{
	uint8_t PortSta0;
	uint8_t PortSta1;
	uint8_t PortSta2;
	uint8_t PortSta3;
	uint8_t PortSta4;
	uint8_t PortSta5;
	uint8_t PortSta6;
	uint8_t PortSta7;
	uint8_t PortSta8;
	uint8_t PortSta9;
	uint8_t PortSta10;
	uint8_t PortSta11;
	uint8_t PortSta12;
	uint8_t PortSta13;
	uint8_t PortSta14;
	uint8_t PortSta15;
	uint8_t PortSta16;
	uint8_t PortSta17;
	uint8_t PortSta18;
	uint8_t PortSta19;
	uint8_t PortSta20;
	uint8_t PortSta21;
	uint8_t PortSta22;
	uint8_t PortSta23;
}Board_PortSta_Info_t;

typedef struct{
	uint8_t PortFun0;
	uint8_t PortFun1;
	uint8_t PortFun2;
	uint8_t PortFun3;
	uint8_t PortFun4;
	uint8_t PortFun5;
	uint8_t PortFun6;
	uint8_t PortFun7;
	uint8_t PortFun8;
	uint8_t PortFun9;
	uint8_t PortFun10;
	uint8_t PortFun11;
	uint8_t PortFun12;
	uint8_t PortFun13;
	uint8_t PortFun14;
	uint8_t PortFun15;
	uint8_t PortFun16;
	uint8_t PortFun17;
	uint8_t PortFun18;
	uint8_t PortFun19;
	uint8_t PortFun20;
	uint8_t PortFun21;
	uint8_t PortFun22;
	uint8_t PortFun23;
}Board_PortFun_Info_t;


typedef struct{
	uint8_t	type;
}Board_Type_Info_t;

#define BOARD_ID_SIZE (10)

typedef struct{
	uint8_t IdLen;
	uint8_t Id[BOARD_ID_SIZE];
}Board_Id_Info_t;


typedef struct{
	uint8_t PortErrClear0;
	uint8_t PortErrClear1;
	uint8_t PortErrClear2;
	uint8_t PortErrClear3;
	uint8_t PortErrClear4;
	uint8_t PortErrClear5;
	uint8_t PortErrClear6;
	uint8_t PortErrClear7;
	uint8_t PortErrClear8;
	uint8_t PortErrClear9;
	uint8_t PortErrClear10;
	uint8_t PortErrClear11;
	uint8_t PortErrClear12;
	uint8_t PortErrClear13;
	uint8_t PortErrClear14;
	uint8_t PortErrClear15;
	uint8_t PortErrClear16;
	uint8_t PortErrClear17;
	uint8_t PortErrClear18;
	uint8_t PortErrClear19;
	uint8_t PortErrClear20;
	uint8_t PortErrClear21;
	uint8_t PortErrClear22;
	uint8_t PortErrClear23;
}Board_PortErrClear_Info_t;


typedef struct{
	uint8_t PortErrSta0;
	uint8_t PortErrSta1;
	uint8_t PortErrSta2;
	uint8_t PortErrSta3;
	uint8_t PortErrSta4;
	uint8_t PortErrSta5;
	uint8_t PortErrSta6;
	uint8_t PortErrSta7;
	uint8_t PortErrSta8;
	uint8_t PortErrSta9;
	uint8_t PortErrSta10;
	uint8_t PortErrSta11;
	uint8_t PortErrSta12;
	uint8_t PortErrSta13;
	uint8_t PortErrSta14;
	uint8_t PortErrSta15;
	uint8_t PortErrSta16;
	uint8_t PortErrSta17;
	uint8_t PortErrSta18;
	uint8_t PortErrSta19;
	uint8_t PortErrSta20;
	uint8_t PortErrSta21;
	uint8_t PortErrSta22;
	uint8_t PortErrSta23;
}Board_PortErrSta_Info_t;




#endif




